<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>异步加载</title>
    <style type="text/css">html {
        height: 100%
    }

    body {
        height: 100%;
        margin: 0px;
        padding: 0px
    }

    #map {
        height: 100%
    }</style>
    <script type="text/javascript">
        function initialize() {
            var mp = new BMap.Map('map');
            mp.centerAndZoom(new BMap.Point(121.491, 31.233), 11);
        }
        function loadScript() {
            var script = document.createElement('script');
            script.src = "http://api.map.baidu.com/api?v=1.3&callback=initialize";
            document.body.appendChild(script);
        }
        window.onload = loadScript;
    </script>
</head>
<body>
<div id="map"></div>
</body>
</html>